#include<iostream>
using namespace std;

class Person{
public :
    // 传统的属性赋值
    Person(int a,int b,int c)
    {
        m_a = a;
        m_b = b;
        m_c = c;
    }
 
    // 初始化列表写死
    Person():mm_a(10),mm_b(20),mm_c(30)
    {
    }

    // 初始化列表写活
    Person(int a,int b,int c):mmm_a(a),mmm_b(b),mmm_c(c)
    {
    }

    int m_a;
    int m_b;
    int m_c;

    int mm_a;
    int mm_b;
    int mm_c;

    int mmm_a;
    int mmm_b;
    int mmm_c;

};

int main()
{
    // 传统有参函数赋值
    Person p(10,20,30);
    cout << "m_a:" << p.m_a<<endl;
    cout << "m_b:" << p.m_b<<endl;
    cout << "m_c:" << p.m_c<<endl;

    // 初始化列表写死
    Person p;
    cout << "mm_a:" << p.mm_a << endl;
    cout << "mm_b:" << p.mm_b<<endl;
    cout << "mm_c:" << p.mm_c<<endl;

    // 初始化列表写活
    Person p(10,20,30);
    cout << "mmm_a:" << p.mmm_a<<endl;
    cout << "mmm_b:" << p.mmm_b<<endl;
    cout << "mmm_c:" << p.mmm_c<<endl;

    return 0;
}